﻿<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Admin Console | Room(s) | EMM</title>
<%@page import="java.util.*" %>
<%
	String Code = (String)session.getAttribute("LanguageCode");
	String SubCode = (String)session.getAttribute("LanguageSubcode");
    Locale locale = new Locale(Code, SubCode);
	ResourceBundle resource = ResourceBundle.getBundle("resource", locale);
%>
<link href="/css/Adminconsole/Main.css" rel="stylesheet" />
<link href="/css/custom/jquery-ui-1.9.1.custom.min.css" rel="stylesheet" />
<link href="/css/Adminconsole/dialog.css" rel="stylesheet" />
<link href="/css/custom/loading.css" rel="stylesheet" />
<link href="/css/components/blocked/popup/popup.css" rel="stylesheet" />

<script src="/js/jquery-1.8.3.min.js"></script>
<script src="/js/jquery-ui-1.9.1.custom.min.js"></script>
<script src="/js/sharedData.js"></script>
<script src="/js/adminconsole/AdminShareData.js"></script>
<script src="/js/simpleservice.js"></script>
<script src="/js/loading.js"></script>
<script src="/js/adminconsole/RoomsManager/Rooms/rooms.js"></script>
<script src="/js/pointerDialog.js"></script>
<script src="/js/adminconsole/EditDialog.js"></script>
<jsp:include page="/adminconsole/language.jsp" flush="true" />

<script>
$(function() {
	label_add="<% out.print(resource.getString("AdminConsole.Page.Room.add"));%>";
	label_multiadd="<% out.print(resource.getString("AdminConsole.Page.Room.add"));%>";
});
</script>

</head>
<body>
	<header>
		<div class="brand"> 
			<div><h2>iHotel</h2></div>
			<div>Admin Console</div>
			<jsp:include page="/adminconsole/menu.jsp" flush="true" />
		</div>
	</header>
	<div class="main">
		<div class="breadcrumb">
			<% out.print(resource.getString("AdminConsole.Page.Room"));%>
		</div>
        <div class="destitle"><% out.print(resource.getString("AdminConsole.Page.Room.suggest"));%></div>
		<div class="content">
			<table cellpadding="0" cellspacing="0">
				<tr>
					<td>
						<div class="titlelist">
							<span>
								<% out.print(resource.getString("AdminConsole.Page.Room.list"));%>
							</span>
							<span id="listsize"></span>
						</div>
					</td>
				</tr>
				<tr>
					<td>
						<span>
							<input class="addbtn"value="<% out.print(resource.getString("AdminConsole.Page.Room.add"));%>" type="button" onClick="gotoadd($(this))">
							<input class="addbtn" value="<% out.print(resource.getString("AdminConsole.Page.Room.addmulti"));%>" type="button" onClick="gotomultiadd($(this))">
						</span>
					</td>
				</tr>
				<tr>
					<td class="tableheadtop">
						<span style="padding-left:10px">
							<input class="deletebtn" name="deletetaxes" value="<% out.print(resource.getString("AdminConsole.Page.Room.del"));%>" type="button" onClick="deleteRooms()">
						</span>
						<span style="float:right">
							<div id="search_new">
								<table style="border:none" cellpadding="5" cellspacing="0">
									<tr>
										<td style="width:50%;">
											<span ><% out.print(resource.getString("AdminConsole.Page.Room.search"));%>:</span>
											<input type="text" name="srchRmNameOrNo" value="">
											<input type="button" name="search" value="<% out.print(resource.getString("AdminConsole.Page.Room.search1"));%>" >
										</td>
										<td width="50%" align="right">
											<% out.print(resource.getString("AdminConsole.Page.Room.filter"));%>:
											<select id="byRoomType" onChange="showRooms()">
												<option value="All">
													<% out.print(resource.getString("AdminConsole.Page.Room.allroomtype"));%>
												</option>                   
											</select>
											<select id="byBlock" onChange="showRooms()">
												<option value="All">
													<% out.print(resource.getString("AdminConsole.Page.Room.allblock"));%>
												</option>              
											</select>
											<select id="byFloor" onChange="showRooms()">
												<option value="All">
													<% out.print(resource.getString("AdminConsole.Page.Room.allfloor"));%>
												</option>                   
											</select>
										</td>
									</tr>
								</table>
							</div>
						</span>
					</td>
				</tr>
				<tr>
					<td>
						<div class="headarraow">&nbsp;</div>
					</td>
				</tr>
				<tr>
					<td>
						<table style="border:none;text-align:center" cellpadding="0" cellspacing="0" id="showList">
							<tr>
								<td class="tablehead"><strong>#</strong></td>
								<td class="tablehead"><input type="checkbox" name="checkbox5" value="checkbox" onClick="toggleSelect()"></td>
								<td class="tablehead titlecenter"><% out.print(resource.getString("AdminConsole.Page.Room.roomname"));%></td>
								<td class="tablehead titlecenter"><% out.print(resource.getString("AdminConsole.Page.RoomTypes"));%></td>
								<td class="tablehead titlecenter"><% out.print(resource.getString("AdminConsole.Page.Block"));%></td>
								<td class="tablehead titlecenter"><% out.print(resource.getString("AdminConsole.Page.Floor"));%></td>
								<td class="tablehead titlecenter"><% out.print(resource.getString("AdminConsole.Page.center.action"));%></td>
								<td class="tablehead titlecenter"><% out.print(resource.getString("AdminConsole.Page.center.status"));%></td>
							</tr>
						</table> 
					</td>
				</tr>
			</table>
		</div>
	</div>
	<div id="BlankDialog" style="display:none; padding:5px 0 0 10px;"></div>
	<div id="loadingScreen"></div>
	<div name="dynamic" style="display:none"></div>
	<script>
		var iFloorId = <%=request.getParameter("floorid")%>;
		var iBlockId = <%=request.getParameter("blockid")%>;
		var iRoomType = <%=request.getParameter("roomtypeid")%>;
		$(function(){
			loadFilter();
			
			if( iFloorId == null && iBlockId == null && iRoomType == null ){
			showRooms();
			}else{
				if(<%=request.getParameter("floorid")%> != null){
					ShowByFillter("All","All",iFloorId);
				}else if(<%=request.getParameter("blockid")%> != null){
					ShowByFillter("All",iBlockId,"All");
				}else if(<%=request.getParameter("roomtypeid")%> != null){
					ShowByFillter(iRoomType,"All","All");
				}
			}
		});
	</script>
</body>
</html>